Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

device handling fix #159

Merged
merged 5 commits into from
Feb 19, 2024
Merged

device handling fix #159

merged 5 commits into from
Feb 19, 2024

Conversation

josephdviviano
Copy link
Collaborator

Removes a "feature" whereby the NeuralNet would automatically cast tensors to a particular device. This would have the strange side effect of moving a part of the gflownet instance to an unexpected device, causing a bug that is confusing to track down.

Instead, the code will now fail in a sensible way if the user does not cast tensors to the correct device, making debugging easy.

This might require slightly more thought in the case where one has multiple environments running on difference devices, but we can address this in a follow up PR.

@saleml
Copy link
Collaborator

saleml commented Feb 18, 2024

Essentially, with this change, we would get the usual pytorch error of incompatible devices instead, right?

@josephdviviano
Copy link
Collaborator Author

josephdviviano commented Feb 18, 2024 via email

Base automatically changed from padding_util_fn to master February 19, 2024 04:18
@josephdviviano josephdviviano merged commit 617cc22 into master Feb 19, 2024
3 checks passed
@josephdviviano josephdviviano deleted the device_handling_fix branch February 19, 2024 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants